home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-08 | 3.9 KB | 122 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: TblSel.h
- // Release Version: $ 1.0d11 $
- //
- // Copyright: © 1995 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef TBLSEL_H
- #define TBLSEL_H
-
- #ifndef TBLPART_H
- #include "TblPart.h"
- #endif
-
- // ----- ODF Includes -----
-
- #ifndef FWSLCING_H
- #include "FWSlcing.h"
- #endif
-
- //==============================================================================
- // Forward declarations
- //==============================================================================
-
- class FW_CLASS_ATTR CTablePart;
- class FW_CLASS_ATTR CTableProxy;
-
- //==============================================================================
- // class CTableSelection
- //==============================================================================
-
- class FW_CLASS_ATTR CTableSelection : public FW_CEmbeddingSelection
- {
- //----------------------------------------------------------------------------------------
- // Initialization/Destruction
- //
- public:
- CTableSelection(Environment* ev, CTablePart* tablePart);
- virtual ~ CTableSelection();
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- //
- public:
- virtual FW_Boolean IsEmpty(Environment* ev) const;
- virtual FW_MProxy* IsSelectionOnlyOneProxy(Environment* ev) const;
- virtual void CloseSelection(Environment* ev);
- virtual FW_Boolean ClearSelection(Environment* ev);
- virtual void SelectAll(Environment* ev);
- virtual ODShape* CreateSelectionFrameShape(Environment* ev);
-
- // ----- Drag and Drop -----
- virtual ODShape* CreateSelectionShape(Environment* ev, ODFacet* facet, FW_CFrame* frame) const;
-
- virtual FW_Boolean IsMouseInDraggableItem(Environment* ev,
- FW_CFrame* frame,
- const FW_CMouseEvent& theMouseEvent,
- FW_Boolean inBackground) const;
-
- virtual void UpdateSelectionOnMouseDown(Environment* ev,
- const FW_CMouseEvent& mouseEvent,
- ODFacet* embeddedFacet,
- FW_Boolean inEmbeddedFrameBorder,
- FW_Boolean inBackground);
-
- // ----- Externalize/Internalize Selection -----
- virtual void DoExternalizeSelection(Environment* ev,
- ODStorageUnit* destinationSU,
- FW_CCloneInfo* cloneInfo);
- virtual FW_Boolean DoInternalizeSelection(Environment* ev,
- ODStorageUnit* sourceSU,
- FW_CCloneInfo* cloneInfo);
-
- // ----- Linking Support -----
- virtual FW_Boolean CanSubscribe(Environment* ev, ODPasteAsMergeSetting& setting);
-
- virtual FW_Boolean IsSelectionPublishable(Environment* ev);
- // Don't allow publishing if cell is a link destination
-
- virtual FW_CPublishLink* DoFindPublisher(Environment* ev);
-
- //----------------------------------------------------------------------------------------
- // New API
- //
- public:
- // ----- Getters/Setters -----
- CCell GetCell() const;
-
- // ----- Selection -----
- void Select(Environment* ev, const CCell& cell, FW_Boolean drawNow);
- void InvalidateSelectBorder(Environment* ev, const CCell& cell);
-
- void InvalidateSelection(Environment* ev);
-
- void SelectProxy(Environment* ev, CTableProxy* proxy);
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- protected:
- // ----- Currently selected cell -----
- CCell fCell;
- CTablePart* fTablePart;
- };
-
-
- //========================================================================================
- // CTableSelection Inlines
- //========================================================================================
-
- //----------------------------------------------------------------------------------------
- // CTableSelection::GetCell
- //----------------------------------------------------------------------------------------
- inline CCell CTableSelection::GetCell() const
- {
- return fCell;
- }
-
- #endif
-